{include file="header.html"}

<div class="page-header">
	<h6>
		充值管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			充值编辑
		</small>
	</h6>
</div><!-- /.page-header -->
<div class="row">
<div class="col-xs-12">
	<form class="form-horizontal" role="form" method="post" action="?app=recharge&act=save" enctype="multipart/form-data">
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="id"> ID </label>
			<div class="col-sm-10">
				<input type="text" id="id" name="id" readonly="" value="{$row->id}" class="col-xs-1" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="name"> 名称 </label>
			<div class="col-sm-10">
				<input type="text" id="name" name="name" value="{$row->name}" class="col-xs-6" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right"> 图片 </label>
			<div class="col-sm-10">
				<table><tr><td>
						<input type="hidden" name="origin_pic" value="{$row->pic}" /> 
						<input type="file" name="pic" value="" /> 
					</td>
					<td>
					{if $row->pic}<img src="{$row->pic}" width="100" />{/if}
					</td>
				</tr></table>	
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="price"> 充值金额 </label>
			<div class="col-sm-10">
				<input type="text" id="price" name="price" value="{$row->price}" class="col-xs-2" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="recharged_money"> 充值后金额 </label>
			<div class="col-sm-10">
				<input type="text" id="recharged_money" name="recharged_money" value="{$row->recharged_money}" class="col-xs-2" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="promotion_begin_time"> 活动开始日期 </label>
			<div class="col-sm-3">
				<div class="input-group">
					<input class="form-control date-picker" name="promotion_begin_time" id="promotion_begin_time" type="text" data-date-format="yyyy-mm-dd" value='{$row->promotion_begin_time|date_format:"%Y-%m-%d"}' />
					<span class="input-group-addon">
						<i class="fa fa-calendar bigger-110"></i>
					</span>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="promotion_end_time"> 活动结束日期 </label>
			<div class="col-sm-3">
				<div class="input-group">
					<input class="form-control date-picker" name="promotion_end_time" id="promotion_end_time" type="text" data-date-format="yyyy-mm-dd" value='{$row->promotion_end_time|date_format:"%Y-%m-%d"}' />
					<span class="input-group-addon">
						<i class="fa fa-calendar bigger-110"></i>
					</span>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="promotion_recharged_money"> 活动期间充值后总金额 </label>
			<div class="col-sm-10">
				<input type="text" id="promotion_recharged_money" name="promotion_recharged_money" value="{$row->promotion_recharged_money}" class="col-xs-2" /> 
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="status"> 状态 </label>
			<div class="col-sm-10">
				<div class="radio">
					<label>
						<input {if $row->status==1}checked{/if} value="1" name="status" type="radio" class="ace" />
						<span class="lbl"> 正常</span>
					</label>
				</div>
				<div class="radio">
					<label>
						<input {if $row->status==0}checked{/if} value="0" name="status" type="radio" class="ace" />
						<span class="lbl"> 隐藏 </span>
					</label>
				</div>
			</div>
		</div>

		<div class="clearfix form-actions">
			<div class="col-md-offset-3 col-md-9">
				<button class="btn btn-info" type="submit">
					<i class="ace-icon fa fa-check bigger-110"></i>
					提交
				</button>

				&nbsp; &nbsp; &nbsp;
				<button class="btn" type="reset">
					<i class="ace-icon fa fa-undo bigger-110"></i>
					重置
				</button>
			</div>
		</div>
	</form>
</div>
</div>

{include file="footer.html"}
<script src="/static/ace/assets/js/date-time/bootstrap-datepicker.js"></script>
<script type="text/javascript">
	jQuery(function($) {
		$('.date-picker').datepicker({
			autoclose: true,
			todayHighlight: true
		})
	});
</script>
